3.1.90 \(\int \cos ^4(a+b x) \sin ^4(a+b x) \, dx\) [90]

Optimal. Leaf size=90 \[ \frac {3 x}{128}+\frac {3 \cos (a+b x) \sin (a+b x)}{128 b}+\frac {\cos ^3(a+b x) \sin (a+b x)}{64 b}-\frac {\cos ^5(a+b x) \sin (a+b x)}{16 b}-\frac {\cos ^5(a+b x) \sin ^3(a+b x)}{8 b} \]

[Out]

3/128*x+3/128*cos(b*x+a)*sin(b*x+a)/b+1/64*cos(b*x+a)^3*sin(b*x+a)/b-1/16*cos(b*x+a)^5*sin(b*x+a)/b-1/8*cos(b*
x+a)^5*sin(b*x+a)^3/b

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 90, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {2648, 2715, 8} \begin {gather*} -\frac {\sin ^3(a+b x) \cos ^5(a+b x)}{8 b}-\frac {\sin (a+b x) \cos ^5(a+b x)}{16 b}+\frac {\sin (a+b x) \cos ^3(a+b x)}{64 b}+\frac {3 \sin (a+b x) \cos (a+b x)}{128 b}+\frac {3 x}{128} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[a + b*x]^4*Sin[a + b*x]^4,x]

[Out]

(3*x)/128 + (3*Cos[a + b*x]*Sin[a + b*x])/(128*b) + (Cos[a + b*x]^3*Sin[a + b*x])/(64*b) - (Cos[a + b*x]^5*Sin
[a + b*x])/(16*b) - (Cos[a + b*x]^5*Sin[a + b*x]^3)/(8*b)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2648

Int[(cos[(e_.) + (f_.)*(x_)]*(b_.))^(n_)*((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[(-a)*(b*Cos[e
 + f*x])^(n + 1)*((a*Sin[e + f*x])^(m - 1)/(b*f*(m + n))), x] + Dist[a^2*((m - 1)/(m + n)), Int[(b*Cos[e + f*x
])^n*(a*Sin[e + f*x])^(m - 2), x], x] /; FreeQ[{a, b, e, f, n}, x] && GtQ[m, 1] && NeQ[m + n, 0] && IntegersQ[
2*m, 2*n]

Rule 2715

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Sin[c + d*x])^(n - 1)/(d*n))
, x] + Dist[b^2*((n - 1)/n), Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integ
erQ[2*n]

Rubi steps

\begin {align*} \int \cos ^4(a+b x) \sin ^4(a+b x) \, dx &=-\frac {\cos ^5(a+b x) \sin ^3(a+b x)}{8 b}+\frac {3}{8} \int \cos ^4(a+b x) \sin ^2(a+b x) \, dx\\ &=-\frac {\cos ^5(a+b x) \sin (a+b x)}{16 b}-\frac {\cos ^5(a+b x) \sin ^3(a+b x)}{8 b}+\frac {1}{16} \int \cos ^4(a+b x) \, dx\\ &=\frac {\cos ^3(a+b x) \sin (a+b x)}{64 b}-\frac {\cos ^5(a+b x) \sin (a+b x)}{16 b}-\frac {\cos ^5(a+b x) \sin ^3(a+b x)}{8 b}+\frac {3}{64} \int \cos ^2(a+b x) \, dx\\ &=\frac {3 \cos (a+b x) \sin (a+b x)}{128 b}+\frac {\cos ^3(a+b x) \sin (a+b x)}{64 b}-\frac {\cos ^5(a+b x) \sin (a+b x)}{16 b}-\frac {\cos ^5(a+b x) \sin ^3(a+b x)}{8 b}+\frac {3 \int 1 \, dx}{128}\\ &=\frac {3 x}{128}+\frac {3 \cos (a+b x) \sin (a+b x)}{128 b}+\frac {\cos ^3(a+b x) \sin (a+b x)}{64 b}-\frac {\cos ^5(a+b x) \sin (a+b x)}{16 b}-\frac {\cos ^5(a+b x) \sin ^3(a+b x)}{8 b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 33, normalized size = 0.37 \begin {gather*} \frac {24 (a+b x)-8 \sin (4 (a+b x))+\sin (8 (a+b x))}{1024 b} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[a + b*x]^4*Sin[a + b*x]^4,x]

[Out]

(24*(a + b*x) - 8*Sin[4*(a + b*x)] + Sin[8*(a + b*x)])/(1024*b)

________________________________________________________________________________________

Maple [A]
time = 0.10, size = 72, normalized size = 0.80

method result size
risch \(\frac {3 x}{128}+\frac {\sin \left (8 b x +8 a \right )}{1024 b}-\frac {\sin \left (4 b x +4 a \right )}{128 b}\) \(33\)
derivativedivides \(\frac {-\frac {\left (\cos ^{5}\left (b x +a \right )\right ) \left (\sin ^{3}\left (b x +a \right )\right )}{8}-\frac {\left (\cos ^{5}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{16}+\frac {\left (\cos ^{3}\left (b x +a \right )+\frac {3 \cos \left (b x +a \right )}{2}\right ) \sin \left (b x +a \right )}{64}+\frac {3 b x}{128}+\frac {3 a}{128}}{b}\) \(72\)
default \(\frac {-\frac {\left (\cos ^{5}\left (b x +a \right )\right ) \left (\sin ^{3}\left (b x +a \right )\right )}{8}-\frac {\left (\cos ^{5}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{16}+\frac {\left (\cos ^{3}\left (b x +a \right )+\frac {3 \cos \left (b x +a \right )}{2}\right ) \sin \left (b x +a \right )}{64}+\frac {3 b x}{128}+\frac {3 a}{128}}{b}\) \(72\)
norman \(\frac {\frac {3 x}{128}-\frac {3 \tan \left (\frac {b x}{2}+\frac {a}{2}\right )}{64 b}-\frac {23 \left (\tan ^{3}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{64 b}+\frac {333 \left (\tan ^{5}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{64 b}-\frac {671 \left (\tan ^{7}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{64 b}+\frac {671 \left (\tan ^{9}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{64 b}-\frac {333 \left (\tan ^{11}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{64 b}+\frac {23 \left (\tan ^{13}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{64 b}+\frac {3 \left (\tan ^{15}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{64 b}+\frac {3 x \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{16}+\frac {21 x \left (\tan ^{4}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{32}+\frac {21 x \left (\tan ^{6}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{16}+\frac {105 x \left (\tan ^{8}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{64}+\frac {21 x \left (\tan ^{10}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{16}+\frac {21 x \left (\tan ^{12}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{32}+\frac {3 x \left (\tan ^{14}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{16}+\frac {3 x \left (\tan ^{16}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{128}}{\left (1+\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )^{8}}\) \(259\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(b*x+a)^4*sin(b*x+a)^4,x,method=_RETURNVERBOSE)

[Out]

1/b*(-1/8*cos(b*x+a)^5*sin(b*x+a)^3-1/16*cos(b*x+a)^5*sin(b*x+a)+1/64*(cos(b*x+a)^3+3/2*cos(b*x+a))*sin(b*x+a)
+3/128*b*x+3/128*a)

________________________________________________________________________________________

Maxima [A]
time = 0.30, size = 33, normalized size = 0.37 \begin {gather*} \frac {24 \, b x + 24 \, a + \sin \left (8 \, b x + 8 \, a\right ) - 8 \, \sin \left (4 \, b x + 4 \, a\right )}{1024 \, b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)^4*sin(b*x+a)^4,x, algorithm="maxima")

[Out]

1/1024*(24*b*x + 24*a + sin(8*b*x + 8*a) - 8*sin(4*b*x + 4*a))/b

________________________________________________________________________________________

Fricas [A]
time = 0.39, size = 56, normalized size = 0.62 \begin {gather*} \frac {3 \, b x + {\left (16 \, \cos \left (b x + a\right )^{7} - 24 \, \cos \left (b x + a\right )^{5} + 2 \, \cos \left (b x + a\right )^{3} + 3 \, \cos \left (b x + a\right )\right )} \sin \left (b x + a\right )}{128 \, b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)^4*sin(b*x+a)^4,x, algorithm="fricas")

[Out]

1/128*(3*b*x + (16*cos(b*x + a)^7 - 24*cos(b*x + a)^5 + 2*cos(b*x + a)^3 + 3*cos(b*x + a))*sin(b*x + a))/b

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 189 vs. \(2 (80) = 160\).
time = 1.67, size = 189, normalized size = 2.10 \begin {gather*} \begin {cases} \frac {3 x \sin ^{8}{\left (a + b x \right )}}{128} + \frac {3 x \sin ^{6}{\left (a + b x \right )} \cos ^{2}{\left (a + b x \right )}}{32} + \frac {9 x \sin ^{4}{\left (a + b x \right )} \cos ^{4}{\left (a + b x \right )}}{64} + \frac {3 x \sin ^{2}{\left (a + b x \right )} \cos ^{6}{\left (a + b x \right )}}{32} + \frac {3 x \cos ^{8}{\left (a + b x \right )}}{128} + \frac {3 \sin ^{7}{\left (a + b x \right )} \cos {\left (a + b x \right )}}{128 b} + \frac {11 \sin ^{5}{\left (a + b x \right )} \cos ^{3}{\left (a + b x \right )}}{128 b} - \frac {11 \sin ^{3}{\left (a + b x \right )} \cos ^{5}{\left (a + b x \right )}}{128 b} - \frac {3 \sin {\left (a + b x \right )} \cos ^{7}{\left (a + b x \right )}}{128 b} & \text {for}\: b \neq 0 \\x \sin ^{4}{\left (a \right )} \cos ^{4}{\left (a \right )} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)**4*sin(b*x+a)**4,x)

[Out]

Piecewise((3*x*sin(a + b*x)**8/128 + 3*x*sin(a + b*x)**6*cos(a + b*x)**2/32 + 9*x*sin(a + b*x)**4*cos(a + b*x)
**4/64 + 3*x*sin(a + b*x)**2*cos(a + b*x)**6/32 + 3*x*cos(a + b*x)**8/128 + 3*sin(a + b*x)**7*cos(a + b*x)/(12
8*b) + 11*sin(a + b*x)**5*cos(a + b*x)**3/(128*b) - 11*sin(a + b*x)**3*cos(a + b*x)**5/(128*b) - 3*sin(a + b*x
)*cos(a + b*x)**7/(128*b), Ne(b, 0)), (x*sin(a)**4*cos(a)**4, True))

________________________________________________________________________________________

Giac [A]
time = 3.43, size = 32, normalized size = 0.36 \begin {gather*} \frac {3}{128} \, x + \frac {\sin \left (8 \, b x + 8 \, a\right )}{1024 \, b} - \frac {\sin \left (4 \, b x + 4 \, a\right )}{128 \, b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)^4*sin(b*x+a)^4,x, algorithm="giac")

[Out]

3/128*x + 1/1024*sin(8*b*x + 8*a)/b - 1/128*sin(4*b*x + 4*a)/b

________________________________________________________________________________________

Mupad [B]
time = 1.50, size = 90, normalized size = 1.00 \begin {gather*} \frac {3\,x}{128}-\frac {-\frac {3\,{\mathrm {tan}\left (a+b\,x\right )}^7}{128}-\frac {11\,{\mathrm {tan}\left (a+b\,x\right )}^5}{128}+\frac {11\,{\mathrm {tan}\left (a+b\,x\right )}^3}{128}+\frac {3\,\mathrm {tan}\left (a+b\,x\right )}{128}}{b\,\left ({\mathrm {tan}\left (a+b\,x\right )}^8+4\,{\mathrm {tan}\left (a+b\,x\right )}^6+6\,{\mathrm {tan}\left (a+b\,x\right )}^4+4\,{\mathrm {tan}\left (a+b\,x\right )}^2+1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a + b*x)^4*sin(a + b*x)^4,x)

[Out]

(3*x)/128 - ((3*tan(a + b*x))/128 + (11*tan(a + b*x)^3)/128 - (11*tan(a + b*x)^5)/128 - (3*tan(a + b*x)^7)/128
)/(b*(4*tan(a + b*x)^2 + 6*tan(a + b*x)^4 + 4*tan(a + b*x)^6 + tan(a + b*x)^8 + 1))

________________________________________________________________________________________